. _
[Cool shit i made]

Golang Zakhireh – local Go proxy for offline use

Local go module proxy. Offline-first. Air-gapped. Sanctioned-country friendly.

Problem

Runs locally. Caches modules on disk. Serves forever offline.

Why I Built It

This Is Different

Main Features

Quick Start (Connected Machine)

      
bash
git clone https://github.com/GolangZakhireh/golang_zakhireh cd golang_zakhireh go run ./cmd/server

Set Go proxy:

      
bash
export GOPROXY=http://localhost:8811/proxy,direct go get github.com/gin-gonic/gin

Dashboard shows cache. Download happens from upstream first time.

Config Environment Variables

      
bash
export GOLANGZAKHIREH_PORT=:9000 export GOLANGZAKHIREH_DATA_DIR=/var/cache/go-modules export GOLANGZAKHIREH_UPSTREAM=https://goproxy.io # or empty for no upstream export GONOSUMDB=github.com/mycompany/* export GOLANGZAKHIREH_ALLOW=github.com/myorg/* export GOLANGZAKHIREH_DENY=badmodule/*

Sanctioned Countries Offline Workflow

  1. Use connected machine (VPN or outside sanctions). Run proxy. go get everything your projects need. Cache fills ./data/modules.
  2. Copy whole data/modules dir to USB/drive.
  3. On offline/sanctioned machine: place data/modules at your DATA_DIR. Start proxy.
  4. Set GOPROXY=http://localhost:8811/proxy,direct
    • (No upstream needed — set to empty or invalid if paranoid)
  5. go build / go test / go mod tidy works fully locally.

Private Modules? Upload via Dashboard or Curl

Example:

      
bash
curl -X POST http://localhost:8811/upload \ -F "module=github.com/mycompany/private" \ -F "version=v1.0.0" \ -F "info=@v1.0.0.info" \ -F "mod=@v1.0.0.mod" \ -F "zip=@v1.0.0.zip"

Docker

      
bash
docker-compose up -d

Mounts to ./data/modules persistent directory.

Why Use This?

Simple. Lightweight. No BS deps.
Works where Athens is overkill or blocked.

Utils Repository

Scrapes Awesome-Go. Gets categories + latest versions. Dumps to txt/csv.

0%